#include <iostream>
#include <algorithm>

#include <vector>
#include <list>
#include <string>

using namespace std;

#include "vector.h"

void test_vector1()
{
    zfox::vector<int> v1;
    v1.push_back(1);
    v1.push_back(2);
    v1.push_back(3);
    v1.push_back(4);
    v1.push_back(4);
    v1.push_back(4);

    for (size_t i = 0; i < v1.size(); i++)
    {
        cout << v1[i] << " ";
    }
    cout << endl;

    for (auto e : v1)
    {
        cout << e << " ";
    }
    cout << endl;

    // int* it = v1.begin();
    //  封装
    zfox::vector<int>::iterator it = v1.begin();
    while (it != v1.end())
    {
        cout << *it << " ";
        ++it;
    }
    cout << endl;

    // cout << typeid(it).name() << endl;
}

int main()
{
    test_vector1();
    return 0;
}